﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NLBS.Data.Interface;
using NLBS.Entity;
namespace NLBS.Data.SqlDataService
{
   public class TagService:ITagService
    {
        private DbProvider db
        {
            get
            {
                return DbProvider.Instance();
            }
        }

        #region ITagService Members

        public IList<string> GetTagByID(Article art)
        {
            return db.GetTagByID(art);
        }

        public ITagCollection<string, Tag> GetTags()
        {
            return db.GetTags();
        }

        public int SaveTag(Article art)
        {
            return db.SaveTag(art);
        }

        public int DeleteTag(Article art)
        {
            return db.DeleteTag(art);
        }

        public IPagedCollection<Article> GetArticleByTag(int startIndex, int pageSize, string tag)
        {
            return db.GetArticleByTag(startIndex, pageSize, tag);
        }

        public IList<Article> GetArticleByIDArray(string[] artIDArray)
        {
            return db.GetArticleByIDArray(artIDArray);
        }

        public IList<string> GetArtIDByTag(string tag)
        {
            return db.GetArtIDByTag(tag);
        }

        #endregion
    }
}
